﻿using LiteDB;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple_search.Data
{
    public class Options
    {
        [BsonId]
        public ObjectId ObjectId { get; set; }
        public string BookDirectory { get; set; }
        public string FileName { get; set; }
        public bool IsFuzzy { get; set; }
        public int BlockSize { get; set; }

        public void Update(Options other)
        {
            BookDirectory = other.BookDirectory;
            FileName = other.FileName;
            IsFuzzy = other.IsFuzzy;
            BlockSize = other.BlockSize;
        }
        public Options() { }

        [BsonCtor]
        public Options(ObjectId _id, string bookDirectory, string fileName, bool isFuzzy, int blockSize)
        {
            ObjectId = _id;
            BookDirectory = bookDirectory;
            FileName = fileName;
            IsFuzzy = isFuzzy;
            BlockSize = blockSize;
        }
    }
}
